package org.dzms.services;

import java.util.List;

import org.dzms.dao.UserinfosDAO;
import org.dzms.entity.Userinfos;

public class UserListService {
	private UserinfosDAO udao;
	public UserListService() {
		udao = new UserinfosDAO();
	}
	public List<Userinfos> findAllUser() {
		return udao.findUsers();
	}
	
	//登录的方法
	public Userinfos login(Userinfos userinfos) {
		List<Userinfos> list = udao.findUsersBy(userinfos);
		if(list==null||list.size()==0){
			return null;
		}
		return list.get(0);
	}
}
